package com.xci.edu.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 考试预约
 * @author 马星俊 maxingjun@xci96716.com
 * @since 2020-11-24 18:00:15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "考试预约")
public class ExamPreExtend extends ExamPre {
    /**
     * 科目主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "科目主键不能为空")
    @Excel(name = "科目主键", width = 20d)
    @ApiModelProperty(value = "科目主键", required = true, position = 10)
    private Long eduCategoryId;

    /**
     * 科目名称
     */
    @NotBlank(message = "科目名称不能为空")
    @Length(max = 50, message = "科目名称长度不能超过{max}个字符")
    @Excel(name = "科目名称", width = 20d)
    @ApiModelProperty(value = "科目名称", required = true, position = 11)
    private String eduCategoryName;
}
